Joshua Alley

Data and code for "Reassessing the Public Goods Theory of Alliances"

All file paths are set to work in the context of project with separate folders for data, figures, and the appendix.
Paths are relative to a core directory, and these files are best run in the context of a project. 

You can download the Rstudio project file and corresponding folders from: https://github.com/joshuaalley/public-goods-test 

Provided paths are set properly, do-all.R will execute all files in the correct order. 
The full analysis should take around an hour to execute, so long as your computer has at least four cores. 

Otherwise, you can run the scripts in this order:
1. setup-script.R
2. ratio-simulation.R
3. analysis.R
4. analysis-z-weight.R
5. analysis-change.R
6. analysis-avg-weight.R
7. simulation-check.R

All analyses done with RSTAN 2.21.2 and R 4.0.3. 